package com.qm.console.dao.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Data
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImMsgDO {
    private Integer id;

    private Integer fromUser;

    private Integer toUser;

    private Integer msgType;

    private Integer fromGender;

    private Integer toGender;

    private Date sendTime;

    private Integer valid;

    private Integer familyId;

    private Integer deleted;

    private String content;

    private Boolean illegal;

    private Integer gift;

    private Integer avCount;

    private Float rate;

    private Integer pay;

    private Integer fiveMinutes;

    private Integer fifteenMinutes;

    private Integer halfHour;

    private Integer oneHour;

    private Integer towHour;

    private Integer imMsgCount;

    private Date endTime;

    private Date startTime;

    private Integer fromIllegal;

    private Integer toIllegal;

    private Integer replyTime;

    private Float fromRate;

    private Float toRate;

    private String familyName;

    private Integer chatNumber;

    private Integer fromStatus;

    private Integer toStatus;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFromUser() {
        return fromUser;
    }

    public void setFromUser(Integer fromUser) {
        this.fromUser = fromUser;
    }

    public Integer getToUser() {
        return toUser;
    }

    public void setToUser(Integer toUser) {
        this.toUser = toUser;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Integer getFromGender() {
        return fromGender;
    }

    public void setFromGender(Integer fromGender) {
        this.fromGender = fromGender;
    }

    public Integer getToGender() {
        return toGender;
    }

    public void setToGender(Integer toGender) {
        this.toGender = toGender;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fromUser=").append(fromUser);
        sb.append(", toUser=").append(toUser);
        sb.append(", msgType=").append(msgType);
        sb.append(", fromGender=").append(fromGender);
        sb.append(", toGender=").append(toGender);
        sb.append(", sendTime=").append(sendTime);
        sb.append(", valid=").append(valid);
        sb.append(", familyId=").append(familyId);
        sb.append(", familyName=").append(familyName);
        sb.append(", deleted=").append(deleted);
        sb.append(", content=").append(content);
        sb.append("]");
        return sb.toString();
    }
}
